const path = require('path');
const { name } = require('./package');
const { QiankunPlugin }  = require('@qiankunjs/webpack-plugin');
function resolve(dir) {
  return path.join(__dirname, dir);
}

const port = "<%= port %>"; // dev port

module.exports = {
  lintOnSave: "warning",
  devServer: {
    hot: true,
    port,
    headers: {
      'Access-Control-Allow-Origin': '*',
    },
    client: {
      overlay: false
    }
  },
  // 自定义webpack配置
  configureWebpack: {
    resolve: {
      alias: {
        '@': resolve('src'),
      },
    },
    plugins:[
      new QiankunPlugin()
    ]
  },
};
